Set Photoelectric Sensor

  • Function:

    magician.set_infrared_sensor(port, enable, version)
    
  • Description: set enabling status and version of photoelectric sensor

  • Required parameter:

    • port: connect photoelectric sensor to the port of Magician, range: 1, 2, 4, 5. Port 1, port 2, port 4 and port 5 correspond to GP1, GP2, GP4 and GP5 on Magician respectively.
    • enable: enable the photoelectric sensor. True: enable; False: disable
    • version: version of photoelectric sensor. 0: V1.0; 1: V2.0
  • Return:
    • True: The command has been finished.
    • False: The command has not been finished.
  • Example

    magician.set_infrared_sensor(port=1, enable=True, version=1)
    

    Connect photoelectric sensor to port 1 of Magician. Enable the photoelectric sensor, and set its version as V2.0.

results matching ""

    No results matching ""